



cd "/Users/haley/Documents/Papers/Vasilopoulos-McAvay/political behavior final"

use "vasilopoulos_etal_data", clear





// Sample Size

d,s //15 807



**** Summary statistics on full sample (not shown)


ta citysize, gen(citysize)
ta educ, gen(educ)
ta csp_rec,gen(csp_rec)
ta age_cat, gen(age_cat)


fre lepen
replace lepen=. if vote_6==.


format lepen tx_immi_iris  imm_share_dep_2015 ///
 tx_chom_iris    unemp_share_dep_2015 ///
 citysize1-citysize4  ///
group sex age_cat1-age_cat6 educ1-educ4 csp_rec1-csp_rec8 unemp  fn_dep intol %9.2f

tabstat lepen ///
tx_immi_iris  imm_share_dep_2015 ///
 tx_chom_iris    unemp_share_dep_2015 fn_dep ///
 citysize1-citysize4  ///
group sex age_cat1-age_cat6 educ1-educ4 csp_rec1-csp_rec8 unemp intol, f column(s)


  
  
  
**** Sample restriction

// Drop if iris missing & missing on vote

drop if tx_immi_iris==.
drop if tx_chom_iris==.


drop if vote_6==.



d,s //12,613






**** Table 1. Summary Statistics on All Variables

tabstat lepen ///
tx_immi_iris  imm_share_dep_2015 ///
 tx_chom_iris    unemp_share_dep_2015  fn_dep ///
 citysize1-citysize4  ///
group sex age_cat1-age_cat6 educ1-educ4 csp_rec1-csp_rec8 unemp intol, f column(s) stat(mean sd)


	 
**** Table 2. Multilevel Model Predicting the Le Pen Vote


* M1A
melogit lepen tx_immi_iris  || dep: || neigh:

estat ic


			** Table A2:
			estat icc


* M1B
melogit lepen tx_immi_iris  imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  || dep: || neigh:


estat ic


* M1C (and Table A3)
melogit lepen tx_immi_iris  imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec b0.group   b0.citysize || dep: || neigh:

estat ic
  
  
* M1D	 
melogit lepen tx_immi_iris  imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec b0.group   b0.citysize intol || dep: || neigh:

 
estat ic	 


	 
** Figure 1. Predicted Probabilities of Voting for the Far Right by Levels of Immigration



* M1C
melogit lepen tx_immi_iris  imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec b0.group   b0.citysize || dep: || neigh:


 margins , at(tx_immi_iris=(0.01 0.08 0.15 0.22 0.29))
 marginsplot, xtitle("Immigrant share") subtitle("Neighborhood") ///
 title("") ytitle("Pr(Le Pen)") name(g1, replace)

 margins , at(imm_share_dep_2015=(0.04 0.09 0.14 0.19 0.24))
 marginsplot, xtitle("Immigrant share") subtitle("Department") ///
 title("") ytitle("Pr(Le Pen)") name(g2, replace)
 
 
 graph combine g1 g2, ycommon


 
 
	 
**Figure 2. Predicted Probabilities of Voting for the Far Right by Levels of Unemployment

 
 margins , at(tx_chom_iris=(0.07 0.13 0.19 0.25 0.31))
 marginsplot, xtitle("Unemployment rate") subtitle("Neighborhood") ///
 title("") ytitle("Pr(Le Pen)") name(g3, replace)

 margins , at(unemp_share_dep_2015=(0.12 0.14 0.16 0.18 0.20))
 marginsplot, xtitle("Unemployment rate") subtitle("Department") ///
 title("") ytitle("Pr(Le Pen)") name(g4, replace)
 


 graph combine g3 g4, ycommon 
 
 
 
** Figure 3. Marginal Effect of the Department Immigrant Share by Neighborhood Immigration 
     ** And: Table A5. Multilevel Model Predicting the Le Pen Vote Including an Interaction between Department and Neighborhood Immigration

melogit lepen c.tx_immi_iris##c.imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec b0.group   b0.citysize || dep: || neigh:

 estat ic

 margins , dydx(imm_share_dep_2015) at(tx_immi_iris=(0.01 0.08 0.15 0.22 0.29))
 marginsplot, recast(scatter) yline(0) xtitle("Neighborhood immigrant share") subtitle("") ///
 title("") ytitle("Effects on Pr(Le Pen)") name(fig3,replace) 
 
 
 
 ** Table A4. Multilevel Model Predicting the Le Pen Vote (controlling for department-level Front national vote share)
 
 
 melogit lepen tx_immi_iris  imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  fn_dep ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec b0.group   b0.citysize || dep: || neigh:

 estat ic
 
 ** Table A6. Multilevel Model Predicting the Le Pen Vote Including an Interaction between Neighborhood Immigration and Migrant Background
 


 melogit lepen b0.group  b0.group#c.tx_immi_iris   imm_share_dep_2015 ///
tx_chom_iris  unemp_share_dep_2015  ///
b1.sex b1.age_cat  b1.educ unemp b4.csp_rec   b0.citysize || dep: || neigh:

estat ic	 

